package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.VehicleRentalsMapper;
import com.ruoyi.system.domain.VehicleRentals;
import com.ruoyi.system.service.IVehicleRentalsService;

/**
 * 车辆租赁信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-08
 */
@Service
public class VehicleRentalsServiceImpl implements IVehicleRentalsService 
{
    @Autowired
    private VehicleRentalsMapper vehicleRentalsMapper;

    /**
     * 查询车辆租赁信息
     * 
     * @param vehicleId 车辆租赁信息主键
     * @return 车辆租赁信息
     */
    @Override
    public VehicleRentals selectVehicleRentalsByVehicleId(Long vehicleId)
    {
        return vehicleRentalsMapper.selectVehicleRentalsByVehicleId(vehicleId);
    }

    /**
     * 查询车辆租赁信息列表
     * 
     * @param vehicleRentals 车辆租赁信息
     * @return 车辆租赁信息
     */
    @Override
    public List<VehicleRentals> selectVehicleRentalsList(VehicleRentals vehicleRentals)
    {
        return vehicleRentalsMapper.selectVehicleRentalsList(vehicleRentals);
    }

    /**
     * 新增车辆租赁信息
     * 
     * @param vehicleRentals 车辆租赁信息
     * @return 结果
     */
    @Override
    public int insertVehicleRentals(VehicleRentals vehicleRentals)
    {
        return vehicleRentalsMapper.insertVehicleRentals(vehicleRentals);
    }

    /**
     * 修改车辆租赁信息
     * 
     * @param vehicleRentals 车辆租赁信息
     * @return 结果
     */
    @Override
    public int updateVehicleRentals(VehicleRentals vehicleRentals)
    {
        return vehicleRentalsMapper.updateVehicleRentals(vehicleRentals);
    }

    /**
     * 批量删除车辆租赁信息
     * 
     * @param vehicleIds 需要删除的车辆租赁信息主键
     * @return 结果
     */
    @Override
    public int deleteVehicleRentalsByVehicleIds(Long[] vehicleIds)
    {
        return vehicleRentalsMapper.deleteVehicleRentalsByVehicleIds(vehicleIds);
    }

    /**
     * 删除车辆租赁信息信息
     * 
     * @param vehicleId 车辆租赁信息主键
     * @return 结果
     */
    @Override
    public int deleteVehicleRentalsByVehicleId(Long vehicleId)
    {
        return vehicleRentalsMapper.deleteVehicleRentalsByVehicleId(vehicleId);
    }
}
